package com.haojii.twittertranslate;

import java.io.IOException;
import java.util.Properties;
import java.util.logging.Logger;


public final class PropertiesConfiguration {

	private static final Logger log = Logger.getLogger(StatusServlet.class.getName());
	
	public static final String TWITTERTRANSLATE_PROPERTIES = "twittertranslate.properties";

	private static final Properties properties = new Properties();

	static {
		
		try {
			properties.load(PropertiesConfiguration.class
					.getResourceAsStream("/WEB-INF/"+ TWITTERTRANSLATE_PROPERTIES));
		} catch (IOException e) {
			log.warning("Exception happened during load /WEB-INF/"+TWITTERTRANSLATE_PROPERTIES);
			log.info(e.getMessage());
		}

	}

	public static String getScreenName() {
		return properties.getProperty("screenName");
	}

	public static String getPassword() {
		return properties.getProperty("password");
	}

}
